package org.liushengpei.com.constant;

/**
 * 索引库常量
 */
public class IndexConstant {

    /**
     * 创建商品信息索引库
     */
    public static final String GOODS_INFO_INDEX = "{\n" +
            "  \"mappings\": {\n" +
            "    \"properties\": {\n" +
            "      \"id\": {\n" +
            "        \"type\": \"keyword\"\n" +
            "      },\n" +
            "      \"shopId\": {\n" +
            "        \"type\": \"keyword\"\n" +
            "      },\n" +
            "      \"code\": {\n" +
            "        \"type\": \"keyword\"\n" +
            "      },\n" +
            "      \"name\": {\n" +
            "        \"type\": \"text\",\n" +
            "        \"analyzer\": \"ik_max_word\",\n" +
            "        \"copy_to\": \"searchAll\"\n" +
            "      },\n" +
            "      \"showImg\": {\n" +
            "        \"type\": \"keyword\",\n" +
            "        \"index\": false\n" +
            "      },\n" +
            "      \"info\": {\n" +
            "        \"type\": \"text\",\n" +
            "        \"index\": false\n" +
            "      },\n" +
            "      \"comeAddress\": {\n" +
            "        \"type\": \"text\",\n" +
            "        \"index\": false\n" +
            "      },\n" +
            "      \"currentPrice\": {\n" +
            "        \"type\": \"double\"\n" +
            "      },\n" +
            "      \"originalPrice\": {\n" +
            "        \"type\": \"double\"\n" +
            "      },\n" +
            "      \"alreadyBuy\": {\n" +
            "        \"type\": \"integer\"\n" +
            "      },\n" +
            "      \"inventory\": {\n" +
            "        \"type\": \"integer\"\n" +
            "      },\n" +
            "      \"type\": {\n" +
            "        \"type\": \"keyword\",\n" +
            "        \"copy_to\": \"searchAll\"\n" +
            "      },\n" +
            "      \"brand\": {\n" +
            "        \"type\": \"keyword\",\n" +
            "        \"copy_to\": \"searchAll\"\n" +
            "      },\n" +
            "      \"status\": {\n" +
            "        \"type\": \"keyword\"\n" +
            "      },\n" +
            "      \"createUser\": {\n" +
            "        \"type\": \"keyword\"\n" +
            "      },\n" +
            "      \"createTime\": {\n" +
            "        \"type\": \"date\"\n" +
            "      },\n" +
            "      \"updateUser\": {\n" +
            "        \"type\": \"keyword\"\n" +
            "      },\n" +
            "      \"updateTime\": {\n" +
            "        \"type\": \"date\"\n" +
            "      },\n" +
            "      \"delFlag\": {\n" +
            "        \"type\": \"integer\"\n" +
            "      },\n" +
            "      \"browseNum\":{\n" +
            "        \"type\": \"integer\"\n" +
            "      },\n" +
            "      \"searchAll\": {\n" +
            "        \"type\": \"keyword\"\n" +
            "      }\n" +
            "    }\n" +
            "  }\n" +
            "}";

    /**
     * 商品介绍图片索引库
     */
    public static final String GOODS_IMG_INDEX = "{\n" +
            "  \"mappings\": {\n" +
            "    \"properties\": {\n" +
            "      \"id\":{\n" +
            "        \"type\": \"keyword\"\n" +
            "      },\n" +
            "      \"goodsInfoId\":{\n" +
            "        \"type\": \"keyword\"\n" +
            "      },\n" +
            "      \"imageUrl\":{\n" +
            "        \"type\": \"keyword\",\n" +
            "        \"index\": false\n" +
            "      },\n" +
            "      \"createUser\":{\n" +
            "        \"type\": \"keyword\"\n" +
            "      },\n" +
            "      \"createTime\":{\n" +
            "        \"type\": \"date\"\n" +
            "      },\n" +
            "      \"updateUser\":{\n" +
            "        \"type\": \"keyword\"\n" +
            "      },\n" +
            "      \"updateTime\":{\n" +
            "        \"type\": \"date\"\n" +
            "      },\n" +
            "      \"delFlag\":{\n" +
            "        \"type\": \"integer\"\n" +
            "      }\n" +
            "    }\n" +
            "  }\n" +
            "}";

    private static final String USER_INDEX = "{\n" +
            "  \"mappings\": {\n" +
            "    \"properties\": {\n" +
            "      \"id\": {\n" +
            "        \"type\": \"keyword\"\n" +
            "      },\n" +
            "      \"headImage\": {\n" +
            "        \"type\": \"keyword\",\n" +
            "        \"index\": false\n" +
            "      },\n" +
            "      \"account\": {\n" +
            "        \"type\": \"keyword\"\n" +
            "      },\n" +
            "      \"password\": {\n" +
            "        \"type\": \"keyword\",\n" +
            "        \"index\": false\n" +
            "      },\n" +
            "      \"userName\": {\n" +
            "        \"type\": \"text\",\n" +
            "        \"analyzer\": \"ik_smart\"\n" +
            "      },\n" +
            "      \"nickName\": {\n" +
            "        \"type\": \"text\",\n" +
            "        \"analyzer\": \"ik_smart\"\n" +
            "      },\n" +
            "      \"phone\": {\n" +
            "        \"type\": \"keyword\"\n" +
            "      },\n" +
            "      \"email\": {\n" +
            "        \"type\": \"keyword\"\n" +
            "      },\n" +
            "      \"sex\": {\n" +
            "        \"type\": \"integer\"\n" +
            "      },\n" +
            "      \"birthday\": {\n" +
            "        \"type\": \"date\",\n" +
            "        \"index\": false\n" +
            "      },\n" +
            "      \"address\": {\n" +
            "        \"type\": \"text\",\n" +
            "        \"analyzer\": \"ik_smart\"\n" +
            "      },\n" +
            "      \"addressDetail\": {\n" +
            "        \"type\": \"keyword\",\n" +
            "        \"index\": false\n" +
            "      },\n" +
            "      \"loginNum\": {\n" +
            "        \"type\": \"integer\",\n" +
            "        \"index\": false\n" +
            "      },\n" +
            "      \"loginTime\": {\n" +
            "        \"type\": \"date\"\n" +
            "      },\n" +
            "      \"identifying\": {\n" +
            "        \"type\": \"integer\"\n" +
            "      },\n" +
            "      \"status\": {\n" +
            "        \"type\": \"integer\"\n" +
            "      },\n" +
            "      \"createTime\": {\n" +
            "        \"type\": \"date\",\n" +
            "        \"index\": false\n" +
            "      },\n" +
            "      \"createUser\": {\n" +
            "        \"type\": \"keyword\"\n" +
            "      },\n" +
            "      \"updateUser\": {\n" +
            "        \"type\": \"keyword\"\n" +
            "      },\n" +
            "      \"updateTime\": {\n" +
            "        \"type\": \"date\",\n" +
            "        \"index\": false\n" +
            "      },\n" +
            "      \"delFlag\": {\n" +
            "        \"type\": \"integer\"\n" +
            "      }\n" +
            "    }\n" +
            "  }\n" +
            "}";
}
